<?php

Route::group(['namespace' => 'Wechat' , 'prefix' => 'wechat' ] , function(){
    Route::any('/' , 'WechatController@index');
    Route::get('menu/text' , 'MenuController@addText');
    Route::get('menu/set' , 'MenuController@setMenu');
    Route::get('login' , 'LoginController@login');
    Route::get('call-back/login' , 'LoginController@callbackLogin');

    Route::any('notify' , 'PayController@payNotify');
    Route::group(['middleware' => 'WebAuth'] , function(){
        Route::post('pay' , 'PayController@getPayData');
    });
});

Route::group(['namespace' => 'Web' , 'middleware' => 'WebAuth'] , function(){


    Route::post('/add', 'IndexController@doAdd');

});

Route::get('/add', 'Web\IndexController@add');
Route::any('/index', 'Web\IndexController@index');

Route::get('/nologin', 'Web\UserController@noLogin');
Route::get('/login/account', 'Web\UserController@login');

